<template>
    <div class="GrandChild">
        <h3>孙组件</h3>
        <h4>a:{{ a }}</h4>
        <h4>b:{{ b }}</h4>
        <h4>x:{{ x }}</h4>
        <h4>y:{{ y }}</h4>
        <button @click="addA(1)">点击将父组件a加1</button>
    </div>
</template>

<script lang="ts" setup name="GrandChild">
    import {ref} from "vue"
    //数据
    defineProps(['a','b','c','x','y','addA'])

</script>

<style scoped>
    .GrandChild{
        background-color: green;
        width: 1000px;
        height: 200px;
    }
</style>